Skip to content

fix: restore consistent local-time display - #73

Open
nexicturbo wants to merge 2 commits into
SPulse-Org:mainfrom
nexicturbo:fix/leaderboard-timezone-consolidation-70
Open

fix: restore consistent local-time display#73
nexicturbo wants to merge 2 commits into
SPulse-Org:mainfrom
nexicturbo:fix/leaderboard-timezone-consolidation-70

Conversation

@nexicturbo

@nexicturbo nexicturbo commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • replace the merged, conflicting timestamp helpers with one seconds-or-milliseconds normalization path
  • keep parsed Stellar event timestamps in Unix seconds and reject malformed or timezone-less ledger values
  • render market-event times and leaderboard refresh times in the viewer's locale with an explicit timezone label
  • reject finite timestamps outside JavaScript's valid date range and round equivalent past/future relative times symmetrically
  • restore the component-based leaderboard view and record the time of every successful refresh, including an empty result
  • remove duplicate imports/exports introduced by overlapping timezone attempts and align the existing Navbar assertion with the current brand text

Root cause

Several overlapping fixes for the earlier timezone issue were merged into the same files. That left duplicate declarations, mixed seconds/milliseconds assumptions, duplicated UI, and syntactically invalid tests. The frontend could no longer compile, and different views formatted the same instant through incompatible code paths.

Impact

Every affected view now uses the same timestamp contract. Users see consistent local times with timezone context, malformed or out-of-range timestamps are discarded instead of being displayed incorrectly, relative past/future times behave consistently, and the leaderboard reports its last successful onchain refresh without inventing a client-only timestamp.

Validation

  • npm test — 13 files, 191 tests passed
  • npm run build — production build passed
  • npx tsc --noEmit — passed
  • git diff --check — passed

Tracking

Fixes #70.

The Opire reward remains attached to the original report in #27; this PR is registered against that reward through Opire's dashboard.

/claim #27

@nexicturbo
nexicturbo marked this pull request as ready for review July 21, 2026 19:37
@nexicturbo

Copy link
Copy Markdown
Author

/claim #27

PR #73 repairs the merge-conflict fallout in current main while preserving one consistent seconds-or-milliseconds timestamp contract across leaderboard and market-event views.

Verified on commit e7cca2f:

  • 13 test files, 191 tests passed
  • npx tsc --noEmit passed
  • production build passed
  • PR is mergeable and clean

@nexicturbo

Copy link
Copy Markdown
Author

@Muyideen-js Could you please review this consolidation before merging another timezone attempt? Current main was left non-compiling by the overlapping merges for #27; #73 resolves those conflicts, restores one timestamp contract across the affected views, and fixes the reopened #70.

Validation on e7cca2f: 13 test files / 191 tests, npx tsc --noEmit, production build, and git diff --check all pass. The PR is cleanly mergeable, and the Opire claim remains tied to #27.

jearthliu added a commit to jearthliu/StellarPulse that referenced this pull request Jul 27, 2026
Remove duplicate formatDate/formatTime/timeAgo definitions.
All timestamp functions now consistently use Intl.DateTimeFormat
with viewer locale+timezone. Fix explorerUrl merge corruption.
Clean up markets page duplicate imports.

Closes SPaulse-Org#70, SPaulse-Org#73
@q514168795

Copy link
Copy Markdown

I'll review the timestamp normalization logic and consolidate the conflicting helpers into a single path that consistently handles both seconds and milliseconds. Additionally, I'll verify the locale rendering and timezone label display for market events and leaderboard refresh times.

/opire try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[wave] Fix inconsistent timezone display in leaderboard

2 participants